1. Field of the Invention
The field of this invention relates to methods, computer program products, and systems for initializing global registers in connection with the compilation and linking of object files used to develop an executable or library software file or execution image for use in a computer programming system or network.
2. Description of Related Art
The designation of one or more of the computer system registers as global in scope increases operational flexibility in the field of computer systems and software. Local registers, unlike global registers, have a scope limited to the particular module or subroutine. By contrast, global registers are selected registers which are used by a computer program generally and not merely by particular modules or subroutines of the computer program. Global variables or symbols are used in connection with such global registers for general use during execution of the computer program.
Global variables and symbols used in computer programs are typically initialized at the beginning of program execution, to provide initial values for use in routines and algorithms which are implemented during operation. However, while such variables and symbols are conventionally initialized in computer memory, there is a lack of initialization provisions for global registers. When different portions of a particular program use a certain global register which has not properly been initialized, misreferencing and erroneous scoping of variables may occur. Such a lack of initialization of a global register tends to cause incorrect program results, because an erroneous variable value, or no value at all, will be in the global register at the time at which it is accessed.
It is desirable to enable initializing global values incident to software operation. While known mechanisms exist for initializing variables in memory to given values before program execution begins, there are no such known mechanisms for initializing a register that is to contain a global variable which needs to be set to a selected value before execution begins.